This HTML page address: http://oss.org.cn/kernel-book/In- depth analysisLinuxKernel sourceObjectiveChapter I. into Linux1.1 GNU and Linux growth1.2 Linux development model and operation mechanism1.3 into Linux Kernel 1.3.1 Featur
Today we introduce a PHP extension development-related book "PHP Internals Book", which is a collaborative effort among several PHP developers to better document and describe how PHP works inside.PHP Internals Book has three main goals:
Document and describe how PHP wo
Chapter One: Introduction to the Linux kernelI. Unix and LinuxUNIX is a powerful, robust, and stable operating system.1.UnixKernel features
Very concise: Provide only hundreds of system calls and have a clear purpose;
In Unix , most things are treated as files (or are committed);
Unix kernel is the related system tool software is written in C language, which makes the system has a strong p
be bound to an interrupted resource. This is possible in eka1. Now, only one ISR (interrupt service routines) is bound to an interrupt ).
2. To ensure a limited number of context conversions, we must limit a thread to a maximum of eight blocks. In eka1, this number is not limited. (Block is a basic object for memory allocation in Symbian OS-Chapter 7 memory model will show more details about this .)
It is very important that not all eka2 services are restricted to real-time conditions. For ex
The books on the kernel can be described in voluminous, but only some of the classic gods have been tested. First, there are 5 time-tested deities (the individual is summed up as "2+1+2", and the first 2 refers to 2 books that fully explain the kernel, in the middle of the 1 refers to 1 of the book Drive Development, the following 2 refers to 2 of the
Embedded System Linux kernel Development Practice Guide (ARM platform) book reviews
I am deeply touched by the heavy book embedded Linux kernel Development Practice Guide (ARM platform. This
- 设置关注变量 - 18.9 detection system 18.9.1 using UID as selection criteria
if (current->uid! = 7777)
{
/ old algorithm /
Else
{
/ New Algorithm /
}
18.9.2 Using condition variables
You can use conditional variables if your code is not process-independent, or if you want to have a mechanism that can be used for all situations to control an attribute.
This is easier than using UID, just to create a global variable as a conditional selector
_ Get _ priority _ Max () returns the maximum and minimum precedence for a given scheduling policy
2. System calls related to processor bindings
Linux Scheduler provides mandatory processor binding mechanism
In a CPUs _ allowed bitmask in a task _ struct
Sched_setaffinity () sets a bitmask of different combinations of one or several bits
Sched _ Getaffinity () returns the current cpus_ allowed bit mask
3. Discard Proces
到其中的一个子进程退出,此时函数返回该子进程的PID。
When you release the process descriptor, you need to call Release_task ().
3.5.2 Orphan Process
Overview: The parent process exits before the process, leaving behind the child process, the orphan process
The workaround:
Finds a new parent process within the current thread group for the orphan process, or directly with Init as its parent process
Call Order:
- do_exit()-- - >forget_original_parent()- - >find_new_p
is in the process context when it executes system calls.(2) The current pointer points to the present task, which is the process that raised the system call.(3) In the context of the process, the kernel can hibernate and can be preempted.(4) System_call () is responsible for switching to user space and letting the user continue execution when the system call returns.5.6.1 The last step of binding a system call:(1) Add the table entry in the system ca
entries that do not copy the parent process.The implementation of the Vfork () system call is done by passing a special flag to the clone () system call.3.4 Implementation of threads in Linux3.4.1 Creating ThreadsCreating a thread is similar to creating a normal process, except that you need to pass some parameter flags when invoking clone () to indicate which resources need to be shared:Clone (CLONE_VM | Clone_fs | Clone_files | clone_sighand,0);The parameter flags passed to clone () determine
Linux Kernel programming paper book recommendation-general Linux technology-Linux programming and kernel information, the following is a detailed description. These are the books read by experts. The following books are popular. I
Lea EAX,[EBX+ECX]
Leal (%EBX,%ECX),%eax
Sub eax,[ebx+ecx*4h-20h]
subl-0x20 (%ebx,%ecx,0x4),%eax
As can be seen from the table, the grammar of at-and-T is more obscure, because [Base+index*scale+disp] can see its meaning at a glance, and disp (Base,index,scale) is unlikely to do so.This approach is often used to access a field within a particular element of the data structure array, where base is the starting address of the array, and scale is the s
queue, and then call Schedule () to select and execute a different process.The process of waking up is just the opposite of the process being set to executable state, and then moving from the wait queue to the executable red-black tree.4.6 Preemption and Context switching4.6.1 User preemptionArises in the following cases:When the user space is returned from the system, when the user space is returned from the interrupt handler;4.6.2 kernel preemption
Compile the linux0.00 kernel (full Linux Kernel Analysis-based on the 0.12 kernel)
I have bought a fully-analyzed Linux kernel written by Zhao Ke-based on the 0.12 kernel. It seems that
and barrier () on UP
Smp_mb ()
Provides the mb () function on SMP and the barrier () function on UP.
Barrier ()
Prevents compilers from crossing barriers to optimize loading or storage operations
To make the preceding Small Example run correctly, use the function in the preceding table to modify the function of thread:
/** Assume the operations on A and B in thread a */void Thread_A () {a = 5; mb ();/** mb () ensure that all the operations on loading and storing v
Tags: socket source x86 INF location Architecture level pre compositionThe world is sad to end, the Octopus elder brother also retired, even the non-sincerity does not disturb in the worship diggers also suddenly a lot less. This "Linux kernel cultivation of the road" in excellence, when, China-pub has also been on sale, although serious literature, but in order to ensure fluency, most of the text I also ar
Linux Kernel Design and Implementation of Reading Notes, Linux Kernel
Chapter 3 Process Management
1. fork system calls are returned twice from the kernel: one is returned to the sub-process and one is returned to the parent process. the task_struct structure is allocated by
:★★★★★Purchase at Dangdang | excellent purchaseAdvanced Programming in UNIX environment is a must-have book for Unix/Linux programmers. It can be said that if a Linux programmer has not read this book, it is as though Christians have not read the Bible, which is hard to understand. This
*/0809 #include
This simplest kernel module only contains the declaration of kernel module Loading Function, uninstalling function, and GPL v2 permission and some descriptions, located in the/kernel/drivers/hello directory of the matching source code in this book. Compile it to generate hello. ko target file, throug
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.